I. Field of the Disclosure
The technology of the disclosure relates generally to processing of pipelined computer instructions in central processing unit (CPU)-based systems.
II. Background
The advent of “instruction pipelining” in modern computer architectures has yielded improved utilization of CPU resources and faster execution times of computer applications. Instruction pipelining is a processing technique whereby a throughput of instructions being processed by a CPU may be increased by splitting the processing of each instruction into a series of steps. The instructions are executed. in an “execution pipeline” composed of multiple stages, with each stage carrying out one of the steps for each of a series of instructions. As a result, in each CPU clock cycle, steps for multiple instructions may be evaluated in parallel. A CPU may optionally employ multiple execution pipelines to further boost performance.
Occasionally, circumstances may arise wherein an instruction is preventedfrom executing during its designated CPU clock cycle in an execution pipeline. For instance, a data dependency may exist between a first instruction and a subsequent instruction (i.e., the subsequent instruction may require data generated by an operation provided by the first instruction). If the first instruction has not completely executed before the subsequent instruction begins execution, the data required by the subsequent instruction may not yet be available when the subsequent instruction executes, and therefore a pipeline “hazard” (specifically, a “read after write hazard”) will occur. To resolve this hazard, the CPU may “stall” or delay execution of the subsequent instruction until the first instruction has completely executed. To help avoid having to stall the subsequent instruction, the CPU may alternatively employ a technique known as “pipeline forwarding.” Pipeline forwarding may prevent the need for stalling execution of the subsequent instruction by allowing a result of the first executed instruction to be accessed by the subsequent instruction without requiring the result to be written to a register and then read back from the register by the subsequent instruction.
Pipeline forwarding may take place between instructions executing within the same execution pipeline, a process which may be more specifically referred to as “intra-pipeline forwarding.” In addition, pipeline forwarding may occur between instructions executing in separate execution pipelines, wherein the process is conventionally referred to as “inter-pipeline forwarding.” A CPU may be configured to provide intra-pipeline forwarding within a single execution pipeline more efficiently and from more access points than inter-pipeline forwarding between two separate execution pipelines. While the performance of inter-pipeline forwarding may be improved by expanding the CPU's forwarding circuitry to effectively add more access points, a tradeoff may exist in the form of increased complexity of the CPU architecture.